package com.sskj.mine.invite;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.bean.MineInviteBean;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.presenter.BasePresenter;


/**
 * @author Hey
 * Create at  2019/05/03
 */
class InvitePresenter extends BasePresenter<InviteActivity> {
    public void getShareInfo() {
        OkGo.<HttpData<MineInviteBean>>get(HttpConfig.BASE_URL + HttpConfig.INVITEMENU)
                .execute(new JsonCallBack<HttpData<MineInviteBean>>(this) {
                    @Override
                    public void onSuccess(Response<HttpData<MineInviteBean>> response) {
                        HttpData<MineInviteBean> body = response.body();
                        if (body.getStatus() == HttpConfig.OK) {
                            mView.updateUi(body.getData());
                        }
                    }
                });
    }
}
